using System;
namespace Senparc.Weixin.MP.AppStore.Api
{
	public class ApiContainer
	{
		public Passport Passport
		{
			get;
			set;
		}
		public MemberApi MemberApi
		{
			get;
			set;
		}
		public ApiContainer(string appKey, string appSecret, string url = "http://api.weiweihi.com:8080")
		{
			PassportBag passportBag = AppStoreManager.GetPassportBag(appKey);
			if (passportBag == null || passportBag.Passport == null)
			{
				AppStoreManager.ApplyPassport(appKey, appSecret, url);
			}
			this.Passport = AppStoreManager.GetPassportBag(appKey).Passport;
			this.MemberApi = new MemberApi(this.Passport);
		}
	}
}
